小标签
import java.io.IOException;
import java.util.List;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.TagSupport;
import com.formcontent.show.ShowFormTypeOperateDb;
import com.forum.hibernatePrj.Space;
public class OutPrintForumType extends TagSupport{
public int doStartTag() throws JspException
{
String printStr="";
ShowFormTypeOperateDb showtype=new ShowFormTypeOperateDb();
List list=showtype.getForumType();
if(list!=null&&list.size()>0)
{
for(int i=0;i
{
Space space=(Space)list.get(i);
if(space!=null)
{
printStr+="
"+"
"+
space.getSpaceName()+" "+space.getSpaceDescription()+" 目前登陆总人数:"+i+" 人访问数:"+i+"人
|
"
+"
|
";
}
}
}
try {
pageContext.getOut().write(printStr);
} catch (IOException e) {
e.printStackTrace();
}
return super.doStartTag();
}
}